// components/Player/Peers/Peers.js
Component({
  /**
   * 组件的属性列表
   */
  options: {
    styleIsolation: 'apply-shared'
  },
  lifetimes: {
    attached() {
      
    },
    detached() {
      // 在组件实例被从页面节点树移除时执行
    },
  },
  properties: {
    playersPeers:Object,
    playersEnemies:Object,
  },

  /**
   * 组件的初始数据
   */
  data: {

  },

  /**
   * 组件的方法列表
   */
  methods: {
    checkData() {

    }, 
    navigatePeer(e) {
      let id = this.data.playersPeers[e.currentTarget.dataset.index].id
      wx.navigateTo({
        url: `/pages/Player/Player?id=${id}`
      })
    },
    navigateEnemy(e) {
      let id = this.data.playersEnemies[e.currentTarget.dataset.index].id
      wx.navigateTo({
        url: `/pages/Player/Player?id=${id}`
      })
    }
  },
 
})
